<template>
  <router-view />
</template>

<script setup>
// 应用根组件
</script>

<style>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
  background-color: #f5f5f5;
}

#app {
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* 重置Element Plus的默认样式 */
.el-container {
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.el-aside {
  height: 100% !important;
  padding: 0 !important;
}

.el-main {
  padding: 0 !important;
  margin: 0 !important;
}

.el-header {
  padding: 0 !important;
  margin: 0 !important;
  height: 60px !important;
}

/* Monaco Editor 兼容性修复 */
.monaco-editor,
.monaco-editor * {
  font-family: 'Monaco', 'Courier New', monospace !important;
}

.monaco-editor .cursor {
  background-color: #aeafad !important;
  border-color: #aeafad !important;
}

.monaco-editor .view-line {
  line-height: 20px !important;
}

/* 确保对话框中的Monaco Editor正常工作 */
.el-dialog .monaco-editor {
  position: relative !important;
}

.el-dialog .monaco-editor .monaco-scrollable-element {
  position: relative !important;
}

/* 响应式优化 */
@media (max-width: 768px) {
  .el-container {
    flex-direction: column;
  }

  .el-aside {
    width: 100% !important;
    height: auto !important;
  }

  .el-main {
    padding: 10px !important;
  }

  .el-header {
    height: 50px !important;
  }
}

@media (max-width: 480px) {
  .el-main {
    padding: 5px !important;
  }

  .el-header {
    height: 45px !important;
  }

  /* Monaco Editor 移动端优化 */
  .monaco-editor {
    font-size: 12px !important;
  }

  .monaco-editor .view-line {
    line-height: 16px !important;
  }
}

/* 移动端触摸优化 */
@media (hover: none) and (pointer: coarse) {

  .el-button,
  .el-input__inner,
  .el-select .el-input__inner {
    min-height: 44px;
  }

  .el-button--small {
    min-height: 36px;
  }
}
</style>